package com.ming.dao;

import com.ming.po.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrdersDao {

	// 创建保存订单
	int saveOrders(Orders order);
	// 查询至包括复杂属性的订单
	Orders getOrdersById(Integer orderId);

	@Select("select * from orders where userId = #{userId}")
	List<Orders> listOrdersByUserId(String userId);
}
